/**
 * 
 */
package com.chocolatefordogs.writersnb.menu;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import com.chocolatefordogs.writersnb.main.MainWindowController;

/**
 * @author Matthew
 *
 */
public final class ExitAction extends AbstractAction {
	
	public ExitAction(final MainWindowController mwCont, final String text) {
		super(text);
		this.mwCont = mwCont;
	}

	/* (non-Javadoc)
	 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
	 */
	@Override
	public void actionPerformed(ActionEvent ae) {
		mwCont.close();
	}
	
	private final MainWindowController mwCont;
}
